package com.cq.hd.product.mapper;

import com.cq.hd.product.api.dto.ActiveRedPacketSonDto;
import com.cq.hd.product.api.dto.RedPacketStatisticsDto;
import com.cq.hd.product.api.vo.ActiveRedPacketVo;
import com.cq.hd.product.po.TbActiveRedPacketPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 活动红包表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@Mapper
public interface TbActiveRedPacketMapper extends BaseMapper<TbActiveRedPacketPo> {

    List<ActiveRedPacketSonDto> listByActiveIds(@Param("activeIds") List<Long> activeIds);

    int subCount(@Param("id") Long id, @Param("count") int count);

    List<ActiveRedPacketVo> listValidRedPacket(RedPacketStatisticsDto redPacketStatisticsDto);

}
